Skip to content

Conversation

@mars-f
Copy link

@mars-f mars-f commented Jun 30, 2017

Use unbuffered stdout for all containers. In dev this makes print()
statements work. In prod using unbuffered output for daemons is just
plain good practice.

Use unbuffered stdout for all containers.  In dev this makes print()
statements work.  In prod using unbuffered output for daemons is just
plain good practice.
@mars-f mars-f requested a review from purelogiq June 30, 2017 19:00

RUN addgroup -g 10001 app && adduser -D -u 10001 -G app -h /app app

ENV PYTHONUNBUFFERED=1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need this in production. In production we will be using mozlog which doesn't have this problem. (And I'm unsure what this will do in production, do you think it is fine to have in prod??)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, I see your comment at the top!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, in prod it's even more important to not lose output because of a buffer. You never know when there will be a message in a buffer somewhere that's critical to debugging a problem, and you'll spend days pulling your hair out trying to figure out why there is no error message before the crash. 😄 😢

@mars-f mars-f merged commit 0023c26 into mozilla-conduit:master Jun 30, 2017
@mars-f mars-f deleted the use-unbuffered-stdout branch June 30, 2017 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants